home *** CD-ROM | disk | FTP | other *** search
-
- // ───────────────────────────────────────────────────────────────────
- // The Aurora Editor v2.0
- // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
- //
- // Get Date and Time in full-format
- //
- // This macro displays the current date in full-name format,
- // i.e. "2:18pm Saturday, January 7, 1995"
- // ───────────────────────────────────────────────────────────────────
-
- // compile time macros and function definitions
- include bootpath "define.aml"
-
- // get date and time in raw format
- rawtime = getrawtime
-
- // note: getrawtime returns "YYYYMMDDWhhmmssuu" where:
-
- // YYYY = year // hh = hour (0-23)
- // MM = month (1-12) // mm = minutes (0-59)
- // DD = day (1-31) // ss = seconds (0-59)
- // W = day of week (0=sunday) // uu = hundredths of a sec (0-99)
-
- full_date =
-
- gettime + ' ' +
-
- // get day of the week
- case rawtime [9]
- when '0' "Sunday" when '4' "Thursday"
- when '1' "Monday" when '5' "Friday"
- when '2' "Tuesday" when '6' "Saturday"
- when '3' "Wednesday"
- end
-
- + ", " +
-
- // get month
- case rawtime [5:2]
- when "01" "January" when "07" "July"
- when "02" "February" when "08" "August"
- when "03" "March" when "09" "September"
- when "04" "April" when "10" "October"
- when "05" "May" when "11" "November"
- when "06" "June" when "12" "December"
- end
-
- // get day of the month and the year
- + ' ' + rawtime [7:2] + ", " + rawtime [1:4]
-
-
- if wintype? "edit" then
- if (okbox full_date + ": Enter into text?" "Full Date") == "Ok" then
- write full_date
- end
- else
- msgbox full_date "Full Date"
- end
-
-
-